package com.wuchao.mapper;

import javax.persistence.*;
import java.security.Timestamp;
import java.util.Objects;

/**
 * @Author wuchao66
 * @Date 2023/1/6 14:42
 * @PackageName:com.entity
 * @ClassName: News1
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
@Entity
@Table(name = "news1")
public class News1 {
    private int id;
    private String typeId;
    private String title;
    private String publisher;
    private String publisherFace;
    private String content;
    private Timestamp createTime;
    private Timestamp updateTime;
    private Integer deleted;
    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    @Basic
    @Column(name = "type_id")
    public String getTypeId() {
        return typeId;
    }
    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }
    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    @Basic
    @Column(name = "publisher")
    public String getPublisher() {
        return publisher;
    }
    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }
    @Basic
    @Column(name = "publisher_face")
    public String getPublisherFace() {
        return publisherFace;
    }
    public void setPublisherFace(String publisherFace) {
        this.publisherFace = publisherFace;
    }
    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
    @Basic
    @Column(name = "deleted")
    public Integer getDeleted() {
        return deleted;
    }
    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }
    @Override
    public boolean equals(Object object) {
        if (this == object) {
            return true;
        }
        if (object == null || getClass() != object.getClass()) {
            return false;
        }
        News1 news = (News1) object;
        return id == news.id &&
                Objects.equals(typeId, news.typeId) &&
                Objects.equals(title, news.title) &&
                Objects.equals(publisher, news.publisher) &&
                Objects.equals(publisherFace, news.publisherFace) &&
                Objects.equals(content, news.content) &&
                Objects.equals(createTime, news.createTime) &&
                Objects.equals(updateTime, news.updateTime) &&
                Objects.equals(deleted, news.deleted);
    }
    @Override
    public int hashCode() {
        return Objects.hash(id, typeId, title, publisher, publisherFace,
                content, createTime, updateTime, deleted);
    }
}
